package cn.sgjk.train.member.controller.admin;


import cn.sgjk.train.common.context.LoginMemberContext;
import cn.sgjk.train.common.resp.CommonResp;
import cn.sgjk.train.common.resp.PageResp;
import cn.sgjk.train.member.req.TicketQueryReq;
import cn.sgjk.train.member.req.TicketSaveReq;
import cn.sgjk.train.member.resp.TicketQueryResp;
import cn.sgjk.train.member.service.TicketService;
import jakarta.validation.Valid;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("/admin/ticket")
public class TicketAdminController {

    private static final Logger LOG = LoggerFactory.getLogger(TicketAdminController.class);
    @Autowired
    private TicketService ticketService;




    @GetMapping("/query-list")
    public CommonResp<PageResp<TicketQueryResp>> query(@Valid TicketQueryReq ticketQueryReq) {
        PageResp<TicketQueryResp> ticketQueryResps = ticketService.queryList(ticketQueryReq);
        return new CommonResp<>(ticketQueryResps);
    }


}

